package com.minjiang.blog.service.impl;

import com.minjiang.blog.mapper.TagDao;
import com.minjiang.blog.mode.Tag;
import com.minjiang.blog.service.TagService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@SuppressWarnings("all")
public class TagServiceImpl implements TagService {

    @Autowired
    private TagDao tagDao;

    @Override
    public int saveTage(Tag tag) {
        return tagDao.saveTage(tag);
    }

    @Override
    public Tag findTagById(Long id) {
        return tagDao.findTagById(id);
    }

    @Override
    public List<Tag> findAllTag() {
        return tagDao.findAllTag();
    }

    @Override
    public Tag getTagByName(String name) {
        return tagDao.getTagByName(name);
    }

    @Override
    public int updateTag(Tag tag) {
        return tagDao.updateTag(tag);
    }

    @Override
    public int deleteTag(Long id) {
        return tagDao.deleteTag(id);
    }
}
